package ch18_filter.web;

/**
 * 责任链模式
 *
 * @author guodd
 * @version 1.0
 */
public class MainTest {
    public static void main(String[] args) {
        String msg = "大家好，<java>，敏感的话语，被就业，需要系统进行处理！";
        Request request = new Request();
        request.setRequestStr(msg);
        Response response = new Response();

        FilterChain fc = new FilterChain();
        fc.add(new FaceFilter()).add(new HtmlFilter()).add(new SensitiveFilter());
        fc.doFilter(request, response, fc);

        System.out.println(request.getRequestStr());
        System.out.println(response.getResponseStr());
    }
}
